/* Yet Another Experimental Software Renderer
 *
 * Copyright (c) 2010 Pawel "Hery" Dziepak
 */

#include "vertex_shader.h"

using namespace yaesr;

vertex vertex_shader_impl::execute(vertex in) {
	vertex out = in;
	double depth = in.position.z;
	in.position.z += 1.0;
	out.position = in.position / in.position.z;
	out.position.z = (depth + 1.0) / 2.0;
	return out;
}